import request from '@/utils/request'

// 查询项目-督办事项列表
export function listDealSupervise(query) {
  return request({
    url: '/supervise/kaiHuiSupervise/list',
    method: 'get',
    params: query
  })
}

// 查询项目-督办事项列表
export function findListTreeInDeal(query) {
  return request({
    url: '/supervise/kaiHuiSupervise/findListTreeInDeal',
    method: 'get',
    params: query
  })
}

// 查询项目-督办事项查询
export function findListSupervise(query) {
  return request({
    url: '/supervise/kaiHuiSupervise/findList',
    method: 'get',
    params: query
  })
}

// 查询项目-督办事项详细
export function getDealSupervise(id) {
  return request({
    url: '/supervise/kaiHuiSupervise/' + id,
    method: 'get'
  })
}

// 保存项目-督办事项
export function saveDealSupervise(data) {
  return request({
    url: '/supervise/kaiHuiSupervise/save',
    method: 'post',
    data: data
  })
}

// 删除项目-督办事项
export function delDealSupervise(id) {
  return request({
    url: '/supervise/kaiHuiSupervise/' + id,
    method: 'delete'
  })
}

// 根据 年度 季度 项目ID获取督办事项列表
export function findByDateAndDealId(query) {
  return request({
    url: '/supervise/kaiHuiSupervise/findByDateAndDealId',
    method: 'get',
    params: query
  })
}

export function ganttChartData(dealId) {
  return request({
    url: '/supervise/kaiHuiSupervise/ganttChartData/' + dealId,
    method: 'get'
  })
}

export function checkCommitNextNodeByBusId(data) {
  return request({
    url: '/supervise/kaiHuiSupervise/checkNodeSwitch',
    method: 'post',
    data: data
  })
}

export function updateTimeByRowId(data) {
  return request({
    url: '/supervise/kaiHuiSupervise/updateTimeByRowId',
    method: 'post',
    data: data
  })
}

export function updateLieByRowId(data) {
  return request({
    url: '/supervise/kaiHuiSupervise/updateLieByRowId',
    method: 'post',
    data: data
  })
}
